Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logger and ostruct to the gemspec #13499

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

hswong3i
Copy link
Contributor

@hswong3i hswong3i commented Sep 6, 2024

logger and ostruct will no longer be the default gem in the Ruby 3.5, without this patch following warning message may come from ruby 3.3+

/opt/vagrant/lib/vagrant/patches/net-ssh.rb:4: warning: logger was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add logger to your Gemfile or gemspec to silence this warning.
/usr/lib/ruby/3.3.0/json/common.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.

hswong3i added a commit to alvistack/hashicorp-vagrant that referenced this pull request Sep 6, 2024
    git clean -xdf
    git submodule sync --recursive
    git submodule update --recursive --init
    git submodule foreach --recursive git clean -xdf
    gem build vagrant.gemspec -o ../vagrant-2.4.1.gem
    bundle config set --local path ./bundle
    bundle install --verbose --standalone
    bundle config set --local cache_all true
    bundle config set --local cache_all_platforms true
    bundle cache
    mv ../vagrant-2.4.1.gem ./vendor/cache/
    rm -rf .bundle bundle vendor/bundle Gemfile.lock
    tar zcvf ../vagrant_2.4.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp vagrant.spec ../vagrant_2.4.1-1.spec
    cp vagrant.rpmlintrc /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    cp ../vagrant*2.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    rm -rf ../vagrant*2.4.1*.*

See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0001-bin-vagrant-silence-warning-about-installer.patch
See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0005-Relax-dependency-resolution.patch
See https://build.opensuse.org/package/show/openSUSE:Factory/vagrant
See hashicorp#13390
See hashicorp#13499

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
hswong3i added a commit to alvistack/hashicorp-vagrant that referenced this pull request Sep 18, 2024
    git clean -xdf
    git submodule sync --recursive
    git submodule update --recursive --init
    git submodule foreach --recursive git clean -xdf
    gem build vagrant.gemspec -o ../vagrant-2.4.1.gem
    bundle config set --local path ./bundle
    bundle install --verbose --standalone
    bundle config set --local cache_all true
    bundle config set --local cache_all_platforms true
    bundle cache
    mv ../vagrant-2.4.1.gem ./vendor/cache/
    rm -rf .bundle bundle vendor/bundle Gemfile.lock
    tar zcvf ../vagrant_2.4.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp vagrant.spec ../vagrant_2.4.1-1.spec
    cp vagrant.rpmlintrc /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    cp ../vagrant*2.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    rm -rf ../vagrant*2.4.1*.*

See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0001-bin-vagrant-silence-warning-about-installer.patch
See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0005-Relax-dependency-resolution.patch
See https://build.opensuse.org/package/show/openSUSE:Factory/vagrant
See hashicorp#13390
See hashicorp#13499
See hashicorp#13503

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
hswong3i added a commit to alvistack/hashicorp-vagrant that referenced this pull request Oct 29, 2024
    git clean -xdf
    git submodule sync --recursive
    git submodule update --recursive --init
    git submodule foreach --recursive git clean -xdf
    gem build vagrant.gemspec -o ../vagrant-2.4.1.gem
    bundle config set --local path ./bundle
    bundle install --verbose --standalone
    bundle config set --local cache_all true
    bundle config set --local cache_all_platforms true
    bundle cache
    mv ../vagrant-2.4.1.gem ./vendor/cache/
    rm -rf .bundle bundle vendor/bundle Gemfile.lock
    tar zcvf ../vagrant_2.4.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp vagrant.spec ../vagrant_2.4.1-1.spec
    cp vagrant.rpmlintrc /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    cp ../vagrant*2.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/hashicorp-vagrant-2.4.1/
    rm -rf ../vagrant*2.4.1*.*

See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0001-bin-vagrant-silence-warning-about-installer.patch
See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0005-Relax-dependency-resolution.patch
See https://build.opensuse.org/package/show/openSUSE:Factory/vagrant
See hashicorp#13390
See hashicorp#13499
See hashicorp#13513

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
@chrisroberts
Copy link
Member

Thanks!

@chrisroberts chrisroberts merged commit 83731a4 into hashicorp:main Oct 30, 2024
12 checks passed
@@ -16,6 +16,8 @@ Gem::Specification.new do |s|
s.required_rubygems_version = ">= 1.3.6"

s.add_dependency "base64", "~> 0.2.0"
s.add_dependency "logger", "~> 1.6.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should probably be changed to ~>1.0 or ~>1.6, refer to #13527 for more info.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or say ~> 1.6.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't speak Ruby so I'm not sure (shrugs), I'll leave the judgement to you.

hswong3i added a commit to alvistack/hashicorp-vagrant that referenced this pull request Nov 2, 2024
    git clean -xdf
    git submodule sync --recursive
    git submodule update --recursive --init
    git submodule foreach --recursive git clean -xdf
    gem build vagrant.gemspec -o ../vagrant-2.4.2.gem
    bundle config set --local path ./bundle
    bundle install --verbose --standalone
    bundle config set --local cache_all true
    bundle config set --local cache_all_platforms true
    bundle cache
    mv ../vagrant-2.4.2.gem ./vendor/cache/
    rm -rf .bundle bundle vendor/bundle Gemfile.lock
    tar zcvf ../vagrant_2.4.2.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp vagrant.spec ../vagrant_2.4.2-1.spec
    cp vagrant.rpmlintrc /osc/home\:alvistack/hashicorp-vagrant-2.4.2/
    cp ../vagrant*2.4.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/hashicorp-vagrant-2.4.2/
    rm -rf ../vagrant*2.4.2*.*

See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0001-bin-vagrant-silence-warning-about-installer.patch
See https://salsa.debian.org/ruby-team/vagrant/-/blob/master/debian/patches/0005-Relax-dependency-resolution.patch
See https://build.opensuse.org/package/show/openSUSE:Factory/vagrant
See hashicorp#13499

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
brlin-tw added a commit to brlin-tw/vagrant that referenced this pull request Nov 4, 2024
…lugin installation

Vagrant version 2.4.2 introduced a patch(512bb74) that sets the logger gem dependency to "~>1.6.1", which is too strict and prevents many Vagrant plugins from being installed.

This patch tones down the dependency specification to mitigate this problem.

Fixes hashicorp#13527.

Refer-to: Add logger and ostruct to the gemspec by hswong3i · Pull Request hashicorp#13499 · hashicorp/vagrant <hashicorp#13499>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants